package com.lagou.edu.mvcframework.pojo;

import com.lagou.edu.mvcframework.servlet.LgDispatcherServlet;

import java.util.HashMap;
import java.util.Map;


public class ModelAndView {

    private String view;
    private final Map<String, Object> model;

    public ModelAndView() {
        LgDispatcherServlet.RequestContext.get().setModelAndView(this);
        model = new HashMap<>();
    }

    public String getView() {
        return view;
    }

    public void setView(String view) {
        this.view = view;
    }

    public Map<String, Object> getModel() {
        return model;
    }
}
